home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BCI NET
/
BCI NET Dec 94.iso
/
archives
/
programming
/
c
/
gcc261ud-c.lha
/
gnu
/
os-include
/
inline
/
ramdrive.h
< prev
next >
Wrap
C/C++ Source or Header
|
1994-09-22
|
1KB
|
58 lines
#ifndef _INLINE_RAMDRIVE_H
#define _INLINE_RAMDRIVE_H
#include <sys/cdefs.h>
#include <inline/stubs.h>
__BEGIN_DECLS
#ifndef BASE_EXT_DECL
#define BASE_EXT_DECL
#define BASE_EXT_DECL0 extern struct Device * RamdriveDevice;
#endif
#ifndef BASE_PAR_DECL
#define BASE_PAR_DECL
#define BASE_PAR_DECL0 void
#endif
#ifndef BASE_NAME
#define BASE_NAME RamdriveDevice
#endif
BASE_EXT_DECL0
extern __inline STRPTR
KillRAD (BASE_PAR_DECL unsigned long unit)
{
BASE_EXT_DECL
register STRPTR _res __asm("d0");
register struct Device *a6 __asm("a6") = BASE_NAME;
register unsigned long d0 __asm("d0") = unit;
__asm __volatile ("jsr a6@(-0x30)"
: "=r" (_res)
: "r" (a6), "r" (d0)
: "a0","a1","d0","d1", "memory");
return _res;
}
extern __inline STRPTR
KillRAD0 (BASE_PAR_DECL0)
{
BASE_EXT_DECL
register STRPTR _res __asm("d0");
register struct Device *a6 __asm("a6") = BASE_NAME;
__asm __volatile ("jsr a6@(-0x2a)"
: "=r" (_res)
: "r" (a6)
: "a0","a1","d0","d1", "memory");
return _res;
}
#undef BASE_EXT_DECL
#undef BASE_EXT_DECL0
#undef BASE_PAR_DECL
#undef BASE_PAR_DECL0
#undef BASE_NAME
__END_DECLS
#endif /* _INLINE_RAMDRIVE_H */